package com.ww.springboot.boot.listener;

import com.ww.springboot.boot.dto.RedisListenerEvent;
import lombok.AllArgsConstructor;
import org.springframework.context.event.EventListener;
import org.springframework.stereotype.Component;

/**
 * @author : liw
 * @date : 2020/11/18 19:34
 */
@Component
@AllArgsConstructor
public class RedisListener {


    @EventListener(value = {RedisListenerEvent.class})
    public void saveLog(RedisListenerEvent redisListenerEvent) {
        System.out.println(redisListenerEvent.getSource());
        System.out.println("消费-----" + System.currentTimeMillis());
    }
}
